/**
 *
 * Copyright 2010 TeleNav, Inc. All rights reserved.
 * MvcContext.java
 *
 */
package com.telenav.framework.mvc;

public abstract class MvcContext
{
    private static MvcContext context = new MvcContext()
    {
        //create an anonymous class
    };
    
    IMvcUiThreadHelper uiThreadHelper;
    
    private MvcContext()
    {
    }
    
    public static MvcContext getInstance()
    {
        return context;
    }
    
    /**
     * start MVC
     * @param helper
     */
    public final void init(IMvcUiThreadHelper helper)
    {
        uiThreadHelper = helper;
    }
    
    /**
     *  get UI thread helper to run jobs inside UI thread
     * 
     * @return UI thread helper
     */
    protected IMvcUiThreadHelper getMvcUiThreadHelper()
    {
    	return uiThreadHelper;
    }
}
